#include "rtc.h"
#include <Windows.h>

int8_t rtc_init()
{
	return 0;
}

int8_t rtc_get_datetime(struct datetime_t *dt)
{
	SYSTEMTIME st;
	GetLocalTime(&st);
	dt->sec = (uint8_t)st.wSecond;
	dt->min = (uint8_t)st.wMinute;
	dt->hour = (uint8_t)st.wHour;
	dt->day = (uint8_t)st.wDay;
	dt->month = (uint8_t)st.wMonth;
	dt->year = (uint8_t)st.wYear-2000;
	dt->weekday = (uint8_t)st.wDayOfWeek+1;
	return 0;
}

int8_t rtc_set_datetime(struct datetime_t *dt)
{
	return 0;
}

